/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package db;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 *
 * @author devashish
 */
@Embeddable
public class ResultsPK implements Serializable {
    @Basic(optional = false)
    @Column(name = "WordId")
    private long wordId;
    @Basic(optional = false)
    @Column(name = "LabelId")
    private long labelId;

    public ResultsPK() {
    }

    public ResultsPK(long wordId, long labelId) {
        this.wordId = wordId;
        this.labelId = labelId;
    }

    public long getWordId() {
        return wordId;
    }

    public void setWordId(long wordId) {
        this.wordId = wordId;
    }

    public long getLabelId() {
        return labelId;
    }

    public void setLabelId(long labelId) {
        this.labelId = labelId;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) wordId;
        hash += (int) labelId;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof ResultsPK)) {
            return false;
        }
        ResultsPK other = (ResultsPK) object;
        if (this.wordId != other.wordId) {
            return false;
        }
        if (this.labelId != other.labelId) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "db.ResultsPK[wordId=" + wordId + ", labelId=" + labelId + "]";
    }

}
